package com.lm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lm.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface ServeMapper extends BaseMapper<Serve> {

 

    List<Organization> findOrg();

    List<DocterTeam> findDoctorTeam(Integer id);

    List<ServicePackage> findServicePackage(Integer teamId);

    List<Docter> findDoctor(Integer teamId);

    List<ServiceItem> findItem(Integer packageId);

    List<Resident> search(String name);

    List<Resident> familyMembers(Integer residentId);

    void serveInsert(Serve serve);


    IPage<Serve> findList(@Param("page") IPage<Serve> page, @Param("serviceRecordState") int serviceRecordState, @Param("serviceOrgId") int serviceOrgId, @Param("serviceDoctorTeamId") int serviceDoctorTeamId, @Param("servicePackageId") int servicePackageId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    Serve findServiceById(Integer residentId);

    void updateState(Integer serviceRecordId);

    void insertHealth(ServiceHealthInfo serviceHealthInfo);

    IPage<Serve> findLists(@Param("page") IPage<Serve> page, @Param("serviceRecordState") int serviceRecordState, @Param("serviceOrgId") int serviceOrgId, @Param("serviceDoctorTeamId") int serviceDoctorTeamId, @Param("servicePackageId") int servicePackageId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);


    void updateStates(@Param("serviceRecordId") Integer serviceRecordId,@Param("serviceCancel") String serviceCancel);

    void updateStateBs(@Param("serviceRecordId") Integer serviceRecordId,@Param("serviceInfo") String serviceInfo );

    void saveServices(Serve serve);

    void updateStateBes(Integer serviceRecordId);
}
